<?php
if(!file_exists("upload")){//如果没有uploads文件夹
 mkdir("upload");//自动创建一个uploads文件夹
}
// print_r($_FILES);
$path=$_FILES['img']['tmp_name'];
move_uploaded_file($path,"upload/".$_FILES['img']['name']);
echo json_encode($_POST);
?>